/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2015
 */

package com.environment_pro.monitor.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.environment_pro.monitor.util.StaticUtil;

/**
 * @author yangfeng 
 * @version 1.0
 * @since 1.0
 */


public class TbDevicePara implements java.io.Serializable{

	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "TbDevicePara";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_DEV_TYPE_CODE = "设备标识码";
	public static final String ALIAS_DEV_PARA_CODE = "参数标识码";
	public static final String ALIAS_DEV_PARA_NAME = "参数名称";
	public static final String ALIAS_DEV_PARA_UNIT = "单位符号";
	public static final String ALIAS_PARA_VALUE_TYPE = "参数取值类型";
	public static final String ALIAS_PARA_VALUE_LENGTH = "参数取值长度";
	public static final String ALIAS_REMARK = "备注";
	public static final String ALIAS_ADD_TIME = "入库时间";
	
	
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	private java.lang.Integer id;

	private java.lang.String devTypeCode;

	private java.lang.String devParaCode;

	private java.lang.String devParaName;

	private java.lang.String devParaUnit;

	private java.lang.String paraValueType;

	private java.lang.Integer paraValueLength;

	private java.lang.String remark;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private  java.util.Date addTime;

	//columns END

	//date String
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date addTimeBegin;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date addTimeEnd;

	public TbDevicePara(){
	}

	public TbDevicePara(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setDevTypeCode(java.lang.String value) {
		this.devTypeCode = value;
	}
	
	public java.lang.String getDevTypeCode() {
		return this.devTypeCode;
	}
	public void setDevParaCode(java.lang.String value) {
		this.devParaCode = value;
	}
	
	public java.lang.String getDevParaCode() {
		return this.devParaCode;
	}
	public void setDevParaName(java.lang.String value) {
		this.devParaName = value;
	}
	
	public java.lang.String getDevParaName() {
		return this.devParaName;
	}
	public void setDevParaUnit(java.lang.String value) {
		this.devParaUnit = value;
	}
	
	public java.lang.String getDevParaUnit() {
		return this.devParaUnit;
	}
	public void setParaValueType(java.lang.String value) {
		this.paraValueType = value;
	}
	
	public java.lang.String getParaValueType() {
		return this.paraValueType;
	}
	public void setParaValueLength(java.lang.Integer value) {
		this.paraValueLength = value;
	}
	
	public java.lang.Integer getParaValueLength() {
		return this.paraValueLength;
	}
	public void setRemark(java.lang.String value) {
		this.remark = value;
	}
	
	public java.lang.String getRemark() {
		return this.remark;
	}

	public void setAddTimeBegin(java.util.Date value) {
		this.addTimeBegin = value;
	}
	
	public java.util.Date getAddTimeBegin() {
		return this.addTimeBegin;
	}

	public void setAddTimeEnd(java.util.Date value) {
		this.addTimeEnd = value;
	}
	
	public java.util.Date getAddTimeEnd() {
		return this.addTimeEnd;
	}
	
	public void setAddTime(java.util.Date value) {
		this.addTime = value;
	}
	
	public java.util.Date getAddTime() {
		return this.addTime;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("DevTypeCode",getDevTypeCode())
			.append("DevParaCode",getDevParaCode())
			.append("DevParaName",getDevParaName())
			.append("DevParaUnit",getDevParaUnit())
			.append("ParaValueType",getParaValueType())
			.append("ParaValueLength",getParaValueLength())
			.append("Remark",getRemark())
			.append("AddTime",getAddTime())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof TbDevicePara == false) return false;
		if(this == obj) return true;
		TbDevicePara other = (TbDevicePara)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

